package com.course.server.mapper.my;

import com.course.server.domain.discusspost.Comment;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface CommentMapper {

    List<Comment> selectCommentsByEntity(String entityType, String entityId, int offset, int limit);

    int selectCountByEntity(String entityType, String entityId);

    int insertComment(Comment comment);

    Comment selectCommentById(String id);

//    List<Comment> selectCommentsByUser(int userId, int offset, int limit);

    int selectCountByUser(String userId);

    List<Comment> selectAllCommentsByEntity(String entityType, String entityId);

    List<Comment> selectCommentsByUser(String userId);

}
